<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link rel="stylesheet" type="text/css"
	href="<%=path%>/jsplug/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
	href="<%=path%>/jsplug/easyui/themes/icon.css">
<%-- 	<link rel="stylesheet" type="text/css" href="<%=path%>/jsplug/easyui/demo/demo.css"> --%>
<script type="text/javascript" src="<%=path%>/js/jquery.min.js"></script>
<script type="text/javascript"
	src="<%=path%>/jsplug/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/mytree.js"></script>
</head>
<body>
	<div style="width: 200px;border:1px solid #A4BED4;">
		<div id="treeDiv" style="float: left;">
			<span id="selText"></span>
		</div>
		<div id="treeDiv" style="float: right;">
			<img onclick="selectTree()" style="background:#E0ECF9 url('images/combo_arrow.gif') no-repeat 3px 4px;width:18px;height:20px;overflow:hidden;display:inline-block;vertical-align:top;cursor:pointer;opacity:0.6;filter:alpha(opacity=60);">
		</div>
		<div style="clear: both;"></div>
	</div>
	<div id="treeComb" style="z-index: 1"><ul id="tree1"></ul></div>
			
	<script type="text/javascript">
		$(function(){
			$.ajax({
		        url:"<%=path%>/Config_loadConfig.action?configName=30.xml",
				type : 'post',
				dataType : 'xml',
				timeout : 3000,
				error : function() {
					alert('加载数据失败...');
				},
				success : function(xml) {
					var tree1 = $("#tree1");
					loadXmlNodeToTree(tree1, $(xml).children(), [ "name" ]);
					tree1.tree({
						onClick : function(node) {
									$("#selText").text(node.text);
									tree1.hide();
						}
					});
					tree1.tree("collapseAll");
					tree1.hide();
					$("#treeComb").css("width",$("#tree1").css("width"));
				}
			});
		});
		function selectTree(){
			$("#tree1").show();
			$("#treeComb").focus();
		}
	</script>

</body>
</html>